<include file="__THEME__/header" />


<script type="text/javascript" src="../Public/Js/Common.js"></script>
<link  href="../Public/group.css" rel="stylesheet" type="text/css"/>
</head>

<body>

<div class="content"><!-- 内容 begin  -->
 
 <!-- 用户组件列表 begin -->
   <include file="__THEME__/apps" />      
  <!-- 用户组件列表 end -->
  
  <div class="main"> <!-- 右侧内容 begin  -->
 
   <include file="../Public/manage_group_top" />
  
  <div class="groupBox">
  <div class="boxL" style="width:100%;">
  <div class="msg" id="msg" style="display:none;">修改成功</div>
    <div class="box1">
  	<h4>设置群的访问权限：</h4>
  	<form method="post" action="__URL__/privacy">
   
          <table class="tableborder" width="100%" cellpadding="2" cellspacing="10">
				  <!-- 公开群设置方法开始 -->
				  
				  	   <tr class="cell">
						  <td class="altbg1">
							<b>什么人可以浏览群组</b>
							<br/>
							
						  </td>
						  <td class="altbg2">
						  	<input  name="brower_level" type="radio" value="1" <eq name="groupinfo['brower_level']" value="1"> checked</eq> > 成员
							<input  name="brower_level" type="radio" value="0" <eq name="groupinfo['brower_level']" value="0"> checked</eq> > 非成员
							<input name="brower_level" type="radio" value="-1" <eq name="groupinfo['brower_level']" value="-1"> checked</eq> >游客
						  </td>
						</tr>
					
						<php>if($config['openUploadFile']){</php>
				  	   <tr class="cell">
             			 <td class="altbg1">
                			<b>是否开启群文件:</b>
                			<br/>
                			<span class="smalltxt"></span>
              			</td>
              			<td class="altbg2"><input type="radio" name="openUploadFile" value="1" onclick="doSwitch(1,'file')" <eq name="groupinfo['openUploadFile']" value="1"> checked</eq> >开启 <input type="radio" name="openUploadFile" value="0" <eq name="groupinfo['openUploadFile']" value="0"> checked</eq> onclick="doSwitch(0,'file')" >关闭</td>
            		   </tr>
            
						<tr class="cell" id="file">
             				 <td class="altbg1">
                			<b>谁可以上传文件:</b>
                			<br/>
                			<span class="smalltxt"></span>
             				 </td>
              				<td class="altbg2"><input type="radio" value="1" name="whoUploadFile" <eq name="groupinfo['whoUploadFile']" value="1"> checked</eq> >仅管理员<input type="radio" value="2" name="whoUploadFile" <eq name="groupinfo['whoUploadFile']" value="2"> checked</eq> >成员</td>
            			</tr>
						<php>}</php>
					
						<php>if($config['openAlbum']){</php>
						 <tr class="cell">
              				<td class="altbg1">
                			<b>是否开启相册:</b>
                			<br/>
                			<span class="smalltxt"></span>
              				</td>
              				<td class="altbg2"><input type="radio" value="1" name="openAlbum" <if condition=" $groupinfo['openAlbum']"> checked </if> onclick="doSwitch(1,'openalbum')" >是<input type="radio" value="0" name="openAlbum" <if condition=" !$groupinfo['openAlbum']"> checked </if> onclick="doSwitch(0,'openalbum')">否</td>
           				 </tr>
            
            			<tr class="cell" id="openalbum">
              				<td class="altbg1">
               				 <b>谁可以创建相册:</b>
                			<br/>
                			<span class="smalltxt"></span>
              				</td>
              				<td class="altbg2"><input type="radio" value="1" name="whoCreateAlbum" <eq name="groupinfo['whoCreateAlbum']" value="1"> checked</eq> >仅管理员<input type="radio" value="2" name="whoCreateAlbum" <eq name="groupinfo['whoCreateAlbum']" value="2"> checked</eq> >成员</td>
            			</tr>
            			<tr class="cell" id="openalbum">
              				<td class="altbg1">
               					 <b>谁可以上传图片:</b>
                				<br/>
                			<span class="smalltxt"></span>
              				</td>
              				<td class="altbg2"><input type="radio" name="whoUploadPic" <eq name="groupinfo['whoUploadPic']" value="1"> checked</eq> value="1">仅管理员<input type="radio" value="2" name="whoUploadPic" <eq name="groupinfo['whoUploadPic']" value="2"> checked</eq> >成员</td>
            			</tr>
						<php>}</php>
				  
					   <tr class="cell">
						  <td class="altbg1">
							<b>是否需要邀请</b>
							<br/>
						
						  </td>
						  <td class="altbg2">
							<input  name="isInvite" type="radio"  onclick="doSwitch(1,'isInvite')" value="1" <php> if($groupinfo['need_invite'] == 1 || $groupinfo['need_invite'] == 2){</php> checked   <php> } </php>  >是
							<input name="isInvite" type="radio"  onclick="doSwitch(0,'isInvite')" value="0" <eq name="groupinfo['need_invite']" value="0"> checked</eq>  >否
						  </td>
						</tr>
						
						 <tr class="cell" id="isInvite">
						  <td class="altbg1">
							<b>邀请</b>
							<br/>
							
						  </td>
						  <td class="altbg2">
						  	<input name="need_invite" type="radio" value="1" <eq name="groupinfo['need_invite']" value="1"> checked</eq>  >仅管理员邀请
							<input  name="need_invite" type="radio" value="2" <eq name="groupinfo['need_invite']" value="2"> checked</eq> >成员邀请
							
						  </td>
						</tr>
						
						
						
						 <tr class="cell">
						  <td class="altbg1">
							<b>是否需要审核</b>
							<br/>
							
						  </td>
						  <td class="altbg2">
							<input  name="need_verify" type="radio" <eq name="groupinfo['need_verify']" value="1"> checked</eq> value="1"> 是
							<input  name="need_verify" type="radio" <eq name="groupinfo['need_verify']" value="0"> checked</eq> value="0">否
						  </td>
						</tr>
						
						 <tr class="cell">
						  <td class="altbg1">
							<b>什么人可以发言/回复话题</b>
							<br/>
							
						  </td>
						  <td class="altbg2">
							<input  name="actor_level" type="radio" <eq name="groupinfo['actor_level']" value="1">  checked </eq> value="1"> 成员
							<input name="actor_level" type="radio" <eq name="groupinfo['actor_level']" value="0"> checked </eq> value="0">非成员
						  </td>
						</tr>
						
						
						<!-- 公开群设置方法结束 -->
						
              	  </table>
              	   <input type="hidden" value="1" name="editsubmit">
         				<input type="hidden" value="{$gid}" name="gid">
        			<input name="button" type="submit" class="btn_b mt5" id="button" value="保存设置" />
      
      </form>
    </div>
    
    </div>
  <!-- end  -->
  </div>  </div><!-- 右侧内容 end  -->
  <div class="c"></div>
</div><!-- 内容 end -->
<script>
		function doSwitch(i,name){
			
			if(i == 1 || i == 2) {
				//$('#openalbum').each(function(j){ $(this)[0].style.display=''; });  
				$("tr[id='"+name+"']").css('display','');
			}else{
				
				$("tr[id='"+name+"']").css('display','none');
			}
		}
		
		
		
		doSwitch({$groupinfo['need_invite']},'isInvite');
		doSwitch({$groupinfo['openAlbum']},'openalbum');
		doSwitch({$groupinfo['openUploadFile']},'file');
		
	 <php> if($success){</php> $('#msg').show();$('#msg').fadeOut(2000); <php>}</php>

	</script>
<include file="__THEME__/footer" />
</body>
</html>
